﻿using System.Reflection;
using EPiServer.Community.Blog;
using JoelAbrahamsson.TestUtilities;

namespace JoelAbrahamsson.MetaWeblog.Tests
{
    public class BlogModuleFixture
    {
        public BlogModuleFixture()
        {
            EPiServerCommonSetup.InitCacheAndHttpContextWithAClearCache();
            SetupBlogModule();
        }

        private void SetupBlogModule()
        {
            typeof(BlogModule).GetField("m_instance", BindingFlags.NonPublic | BindingFlags.Static).SetValue(null, new BlogModule());
        }
    }
}
